<%-- 
    Document   : registerUser
    Created on : Jun 16, 2012, 9:39:52 PM
    Author     : Arnold
--%>

<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="sj" uri="/struts-jquery-tags"%>
<%@ taglib prefix="sjg" uri="/struts-jquery-grid-tags"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Curriculum-based Subject Reservation System</title>
        <sj:head jqueryui="true" jquerytheme="south-street" compressed="false"/>
        <script src="../js/jquery.validationEngine-en.js" type="text/javascript" charset="utf-8"></script>
        <script src="../js/jquery.validationEngine.js" type="text/javascript" charset="utf-8"></script>
        <link rel="stylesheet" href="../css/validationEngine.jquery.css" type="text/css"/>
        <link rel="stylesheet" type="text/css" href="../css/globalStyle.css"/>
        <script type="text/javascript" src="../js/globalScript.js"></script>
        <script type="text/javascript" src="../js/user.js"></script>
    </head>
    <body>
        <div id="pageWrapper">
            <!--            <div id="headerComponent">-->
            <jsp:include page="../components/headerComponent.jsp"/>

            <!--            </div>-->

            <div id="contentComponent">
                <div class="gen-green-border">
                    <h2 class="gen-header">
                        New Student Registration 
                    </h2>
                    <p class="gen-padding">
                        This is an online Subject Reservation System of Panpacific University North Philippines.<br>
                        Please supply information to all the fields except the ID number because this will be generated for you.
                    </p>
                    <form id="registerForm" name="registerForm" method="POST">
                        <fieldset class="gen-form-divider gen-border gen-round-border gen-margin">
                            <legend class="gen-margin gen-font-bold gen-green-font">
                                Account Information
                            </legend> 
                            <table class="gen-full-width">
                                <tr>
                                    <td class="gen-margin">ID Number: </td>
                                    <td>
                                        <input type="text" 
                                               name="studentIDno" 
                                               id="studentIDno" 
                                               class="gen-short-text-width"
                                               readonly="true"/>
                                    </td>
                                    <td class="gen-margin">Password: </td>
                                    <td>
                                        <div class="inputContainer">
                                            <input type="password" 
                                                   name="studentPassword" 
                                                   id="studentPassword" 
                                                   class="gen-normal-text-width validate[required,custom[onlyLetterEsp]]"/>
                                        </div>
                                    </td>
                                    <td class="gen-margin">Email Address: </td>
                                    <td>
                                        <div class="inputContainer">
                                            <input type="text" 
                                                   name="studentEmail" 
                                                   id="studentEmail" 
                                                   class="gen-medium-text-width validate[required,custom[email]]"/>
                                        </div>
                                    </td>

                                </tr>
                            </table>
                        </fieldset>

                        <fieldset class="gen-form-divider gen-border gen-round-border gen-margin">
                            <legend class="gen-margin gen-font-bold gen-green-font">
                                Course Information
                            </legend> 
                            <table class="gen-full-width">
                                <tr>
                                    <td class="gen-margin">College: </td>
                                    <td>
                                        <div class="inputContainer gen-full-width">
                                            <s:url id="remoteurl" action="register~view_colleges_programs"/>
                                            <sj:select name="collegeID"
                                                       id="collegeID"
                                                       href="%{remoteurl}"
                                                       list="collegeList"
                                                       listKey="collegeID"
                                                       listValue="collegeName" 
                                                       onChangeTopics="reloadProgram"
                                                       formIds="registerForm"
                                                       cssClass="gen-short-text-width validate[required]"
                                                       emptyOption="true"
                                                       />
                                        </div>
                                    </td>
                                    <td class="gen-margin">Course &  Major: </td>
                                    <td>
                                        <div class="inputContainer gen-full-width">

                                            <sj:select name="programRevisionID"
                                                       id="programRevisionID"
                                                       href="%{remoteurl}"
                                                       list="programRevisionList"
                                                       listKey="programRevisionID"
                                                       listValue="programDescription"
                                                       cssClass="gen-longer-text-width validate[required]"
                                                       formIds="registerForm"
                                                       listenTopics="reloadProgram"/>                                              

                                        </div>
                                    </td>
                                </tr>
                            </table>
                        </fieldset>

                        <fieldset class="gen-form-divider gen-border gen-round-border gen-margin">
                            <legend class="gen-margin gen-font-bold gen-green-font">
                                Personal Information
                            </legend> 
                            <table class="gen-full-width">
                                <tr>
                                    <td class="gen-margin">First Name: </td>
                                    <td>
                                        <input type="text" 
                                               name="studentFirstName" 
                                               id="studentFirstName" 
                                               class="gen-normal-text-width  validate[required]"
                                               />
                                    </td>
                                    <td class="gen-margin">Middle Name: </td>
                                    <td>
                                        <input type="text" name="studentMiddleName" 
                                               id="studentMiddleName" 
                                               class="gen-normal-text-width validate[required]"/>
                                    </td>
                                    <td class="gen-margin">Last Name: </td>
                                    <td>
                                        <input type="text" 
                                               name="studentLastName" 
                                               id="studentLastName" 
                                               class="gen-normal-text-width validate[required]"/>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="gen-margin">Date of Birth: </td>
                                    <td>
                                        <sj:datepicker name="studentDateOfBirth" 
                                                       id="studentDateOfBirth" 
                                                       cssClass="gen-normal-text-width gen-border validate[required]" 
                                                       showOn="focus" 
                                                       changeMonth="true" 
                                                       changeYear="true" 
                                                       yearRange="-70:+50" />

                                    </td>
                                    <td class="gen-margin">Place of Birth: </td>
                                    <td colspan="3">

                                        <input type="text" 
                                               name="studentPlaceOfBirth" 
                                               id="studentPlaceOfBirth" 
                                               class="gen-long-text-width validate[required]"/>
                                    </td>
                                </tr>
                                <tr>

                                    <td class="gen-margin">Contact Number: </td>
                                    <td>
                                        <input type="text" 
                                               name="studentContactNo" 
                                               id="studentContactNo" 
                                               class="gen-normal-text-width validate[required]"/>
                                    </td>
                                    <td class="gen-margin">Address : </td>
                                    <td colspan="3">

                                        <input type="text" 
                                               name="studentAddress" 
                                               id="studentAddress" 
                                               class="gen-long-text-width validate[required]"/>
                                    </td>
                                </tr>
                            </table>
                        </fieldset>
                        <sj:a button="true" id="saveUser" cssClass="ui-button-text gen-margin">Register</sj:a>
                    </form>
                    <sj:dialog autoOpen="false" closeOnEscape="true" modal="true" id="messageDialog" title="CBSRS"
                               buttons="{
                               'Ok':function() {  $('#messageDialog').dialog('close'); }
                               }">
                    </sj:dialog>
                </div>
            </div>
            <div id="footerComponent">
                <hr />
                Copyright &COPY; 2012 Panpacific University North Philippines<br />
                All rights reserved. <br/>

            </div>
        </div>
    </body>
</html>
